using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Xfinity.Entities.Managers;

namespace Xfinity.Weapons
{
    ///<summary>
    /// Manages weapons.
    ///</summary>
    public class WeaponManager : GlobalManager
    {
        public WeaponManager(string name, Game game)
            : base(name, true,game)
        {
            projectiles = new List<Projectile>();
            weaponTypes = new List<RangedWeapon>();
        }

        public void Add(ref Projectile projectile)
        {
            projectiles.Add(projectile);
        }
        //public static float 
        public override void Update(GameTime gameTime)
        {
            float seconds = (float)gameTime.ElapsedRealTime.TotalSeconds;
            for (int i = 0; i < projectiles.Count; i++)
            {
                projectiles[i].Update(ref seconds);
            }
            base.Update(gameTime);
        }
        List<Projectile> projectiles;
        static List<RangedWeapon> weaponTypes;
    }
}
